home *** CD-ROM | disk | FTP | other *** search
- #ifndef _INLINE_MUIMASTER_H
- #define _INLINE_MUIMASTER_H
-
- #define __INLINE_STDARG_BROKEN__
-
- #if !defined(__GNUC__)
- #error This file is for GNU-C only
- #elif !defined(mc68000)
- #error This file is for m68k systems only
- #else
-
- #include <sys/cdefs.h>
-
- #ifndef INTUITION_CLASSES_H
- #include <intuition/classes.h>
- #endif
-
- #ifndef UTILITY_TAGITEM_H
- #include <utility/tagitem.h>
- #endif
-
- __BEGIN_DECLS
-
- #ifndef BASE_EXT_DECL
- #define BASE_EXT_DECL
- #define BASE_EXT_DECL0 extern struct Library *MUIMasterBase;
- #endif
- #ifndef BASE_PAR_DECL
- #define BASE_PAR_DECL
- #define BASE_PAR_DECL0 void
- #endif
- #ifndef BASE_NAME
- #define BASE_NAME MUIMasterBase
- #endif
-
- BASE_EXT_DECL0
-
- /************************************************************************/
-
- extern __inline APTR MUI_AllocAslRequest(BASE_PAR_DECL ULONG type, const struct TagItem *TagList)
-
- {
- BASE_EXT_DECL
- register APTR res __asm("d0");
- register struct Library *a6 __asm("a6") = BASE_NAME;
- register ULONG d0 __asm("d0") = type;
- register const struct TagItem *a0 __asm("a0") = TagList;
-
- __asm volatile ("jsr a6@(-0x30)"
- : "=r" (res)
- : "r" (a6), "r" (d0), "r" (a0)
- : "d0","d1", "a0", "a1", "cc" );
- return res;
- }
-
- #if !defined(NO_INLINE_STDARG) && !defined(__INLINE_STDARG_BROKEN__)
- #define MUI_AllocAslRequestTags(type, tags...) ({struct TagItem _tags[]={tags}; return MUI_AllocAslRequest(type,_tags);})
- #endif
-
- /************************************************************************/
-
- extern __inline BOOL MUI_AslRequest(BASE_PAR_DECL APTR requester, const struct TagItem *TagList)
-
- {
- BASE_EXT_DECL
- register BOOL res __asm("d0");
- register struct Library *a6 __asm("a6") = BASE_NAME;
- register APTR a0 __asm("a0") = requester;
- register const struct TagItem *a1 __asm("a1") = TagList;
-
- __asm volatile ("jsr a6@(-0x36)"
- : "=r" (res)
- : "r" (a6), "r" (a0), "r" (a1)
- : "d0", "d1", "a0", "a1", "memory", "cc" );
- return res;
- }
-
- #if !defined(NO_INLINE_STDARG) && !defined(__INLINE_STDARG_BROKEN__)
- #define MUI_AslRequestTags(req, tags...) ({struct TagItem _tags[]={tags}; return MUI_AslRequest(req,_tags);})
- #endif
-
- /************************************************************************/
-
- extern __inline struct MUI_CustomClass *MUI_CreateCustomClass(BASE_PAR_DECL
- struct Library *LibraryBase,
- const char *SuperName,
- struct MUI_CustomClass *SuperMCC,
- int Datasize,
- APTR Dispatcher)
-
- {
- BASE_EXT_DECL
- register struct MUI_CustomClass *res __asm("d0");
- register struct Library *a6 __asm("a6") = BASE_NAME;
- register struct Library *a0 __asm("a0") = LibraryBase;
- register const char *a1 __asm("a1") = SuperName;
- register struct MUI_CustomClass *a2 __asm("a2") = SuperMCC;
- register int d0 __asm("d0") = Datasize;
- register APTR a3 __asm("a3") = Dispatcher;
-
- __asm volatile ("jsr a6@(-0x6c)"
- : "=r" (res)
- : "r" (a6), "r" (a0), "r" (a1), "r" (a2), "r" (d0), "r" (a3)
- : "d0", "d1", "a0", "a1", "cc");
- return res;
- }
-
- /************************************************************************/
-
- extern __inline BOOL MUI_DeleteCustomClass(BASE_PAR_DECL struct MUI_CustomClass *mcc)
-
- {
- BASE_EXT_DECL
- register BOOL res __asm("d0");
- register struct Library *a6 __asm("a6") = BASE_NAME;
- register struct MUI_CustomClass *a0 __asm("a0") = mcc;
-
- __asm volatile ("jsr a6@(-0x72)"
- : "=r" (res)
- : "r" (a6), "r" (a0)
- : "d0", "d1", "a0", "a1", "cc" );
- return res;
- }
-
- /************************************************************************/
-
- extern __inline void MUI_DisposeObject(BASE_PAR_DECL Object *TheObject)
-
- {
- BASE_EXT_DECL
- register struct Library *a6 __asm("a6") = BASE_NAME;
- register Object *a0 __asm("a0") = TheObject;
-
- __asm volatile ("jsr a6@(-0x24)"
- :
- : "r" (a6), "r" (a0)
- : "d0", "d1", "a0", "a1", "cc" );
- }
-
- /************************************************************************/
-
- extern __inline LONG MUI_Error(BASE_PAR_DECL0)
-
- {
- BASE_EXT_DECL
- register LONG res __asm("d0");
- register struct Library *a6 __asm("a6") = BASE_NAME;
-
- __asm volatile ("jsr a6@(-0x42)"
- : "=r" (res)
- : "r" (a6)
- : "d0", "d1", "a0", "a1", "cc" );
- return res;
- }
-
- /************************************************************************/
-
- extern __inline void MUI_FreeAslRequest(BASE_PAR_DECL APTR requester)
-
- {
- BASE_EXT_DECL
- register struct Library *a6 __asm("a6") = BASE_NAME;
- register APTR a0 __asm("a0") = requester;
-
- __asm volatile ("jsr a6@(-0x3c)"
- :
- : "r" (a6), "r" (a0)
- : "d0", "d1", "a0", "a1", "cc" );
- }
-
- /************************************************************************/
-
- extern __inline void MUI_FreeClass(BASE_PAR_DECL struct IClass *TheClass)
-
- {
- BASE_EXT_DECL
- register struct Library *a6 __asm("a6") = BASE_NAME;
- register struct IClass *a0 __asm("a0") = TheClass;
-
- __asm volatile ("jsr a6@(-0x54)"
- :
- : "r" (a6), "r" (a0)
- : "d0", "d1", "a0", "a1", "cc" );
- }
-
- /************************************************************************/
-
- extern __inline struct IClass *MUI_GetClass(BASE_PAR_DECL const char *ClassName)
-
- {
- BASE_EXT_DECL
- register struct IClass *res __asm("d0");
- register struct Library *a6 __asm("a6") = BASE_NAME;
- register const char *a0 __asm("a0")=ClassName;
-
- __asm volatile ("jsr a6@(-0x4e)"
- : "=r" (res)
- : "r" (a6), "r" (a0)
- : "d0", "d1", "a0", "a1", "cc" );
- return res;
- }
-
- /************************************************************************/
-
- extern __inline Object *MUI_MakeObjectA(BASE_PAR_DECL LONG Type, const ULONG *Params)
-
- {
- BASE_EXT_DECL
- register Object *res __asm("d0");
- register struct Library *a6 __asm("a6") = BASE_NAME;
- register LONG d0 __asm("d0") = Type;
- register const ULONG *a0 __asm("a0") = Params;
-
- __asm volatile ("jsr a6@(-0x78)"
- : "=r" (res)
- : "r" (a6), "r" (d0), "r" (a0)
- : "d0", "d1", "a0", "a1", "cc" );
- return res;
- }
-
- #if !defined(NO_INLINE_STDARG) && !defined(__INLINE_STDARG_BROKEN__)
- #define MUI_MakeObject(type,params...) ({ULONG _params[]={params}; return MUI_MakeObjectA(type,_params);})
- #endif
-
- /************************************************************************/
-
- extern __inline Object *MUI_NewObjectA(BASE_PAR_DECL const char *ClassName, const struct TagItem *TagList)
-
- {
- BASE_EXT_DECL
- register Object *res __asm("d0");
- register struct Library *a6 __asm("a6") = BASE_NAME;
- register const char *a0 __asm("a0") = ClassName;
- register const struct TagItem *a1 __asm("a1") = TagList;
-
- __asm volatile ("jsr a6@(-0x1e)"
- : "=r" (res)
- : "r" (a6), "r" (a0), "r" (a1)
- : "d0", "d1", "a0", "a1", "cc" );
- return res;
- }
-
- #if !defined(NO_INLINE_STDARG) && !defined(__INLINE_STDARG_BROKEN__)
- #define MUI_NewObject(class, tags...) ({struct TagItem _tags[]={tags}; return MUI_NewObjectA(class,_tags);})
- #endif
-
- /************************************************************************/
-
- extern __inline void MUI_Redraw(BASE_PAR_DECL Object *TheObject, ULONG Flags)
-
- {
- BASE_EXT_DECL
- register struct Library *a6 __asm("a6") = BASE_NAME;
- register Object *a0 __asm("a0") = TheObject;
- register ULONG d0 __asm("d0") = Flags;
-
- __asm volatile ("jsr a6@(-0x66)"
- :
- : "r" (a6), "r" (a0), "r" (d0)
- : "d0", "d1", "a0", "a1", "cc", "memory" );
- }
-
- /************************************************************************/
-
- extern __inline void MUI_RejectIDCMP( BASE_PAR_DECL Object *TheObject, ULONG Flags)
-
- {
- BASE_EXT_DECL
- register struct Library *a6 __asm("a6") = BASE_NAME;
- register Object *a0 __asm("a0") = TheObject;
- register ULONG d0 __asm("d0") = Flags;
-
- __asm volatile ("jsr a6@(-0x60)"
- :
- : "r" (a6), "r" (a0), "r" (d0)
- : "d0", "d1", "a0", "a1", "cc" );
- }
-
- /************************************************************************/
-
- extern __inline LONG MUI_RequestA(BASE_PAR_DECL
- Object *Application,
- Object *TheWindow,
- LONGBITS Flags,
- const char *Title,
- const char *Gadgets,
- const char *FormatString,
- APTR Params)
-
- {
- BASE_EXT_DECL
- register LONG res __asm("d0");
- register struct Library *a6 __asm("a6") = BASE_NAME;
- register Object *d0 __asm("d0") = Application;
- register Object *d1 __asm("d1") = TheWindow;
- register LONGBITS d2 __asm("d2") = Flags;
- register const char *a0 __asm("a0") = Title;
- register const char *a1 __asm("a1") = Gadgets;
- register const char *a2 __asm("a2") = FormatString;
- register APTR a3 __asm("a3") = Params;
-
- __asm volatile ("jsr a6@(-0x2a)"
- : "=r" (res)
- : "r" (a6), "r" (d0), "r" (d1), "r" (d2), "r" (a0), "r" (a1), "r" (a2), "r" (a3)
- : "d0", "d1", "a0", "a1", "cc" );
- return res;
- }
-
- #if !defined(NO_INLINE_STDARG) && !defined(__INLINE_STDARG_BROKEN__)
- #define MUI_Request(app,win,flags,title,gadgets,format,params...) ({union {LONG a, unsigned LONG b, void *c} _params[]={params}; return MUI_RequestA(app,win,flags,title,gadgets,format,_params);})
- #endif
-
- /************************************************************************/
-
- extern __inline void MUI_RequestIDCMP(BASE_PAR_DECL Object *TheObject, ULONG Flags)
-
- {
- BASE_EXT_DECL
- register struct Library *a6 __asm("a6") = BASE_NAME;
- register Object *a0 __asm("a0") = TheObject;
- register ULONG d0 __asm("d0") = Flags;
-
- __asm volatile ("jsr a6@(-0x5a)"
- :
- : "r" (a6), "r" (a0), "r" (d0)
- : "d0", "d1", "a0", "a1", "cc" );
- }
-
- /************************************************************************/
-
- extern __inline LONG MUI_SetError(BASE_PAR_DECL LONG ErrorNum)
-
- {
- BASE_EXT_DECL
- register LONG res __asm("d0");
- register struct Library *a6 __asm("a6") = BASE_NAME;
- register LONG d0 __asm("d0") = ErrorNum;
-
- __asm volatile ("jsr a6@(-0x48)"
- : "=r" (res)
- : "r" (a6), "r" (d0)
- : "d0", "d1", "a0", "a1", "cc" );
- return res;
- }
-
- /************************************************************************/
-
- #undef BASE_EXT_DECL
- #undef BASE_EXT_DECL0
- #undef BASE_PAR_DECL
- #undef BASE_PAR_DECL0
- #undef BASE_NAME
-
- __END_DECLS
-
- #endif
-
- #endif /* _INLINE_MUIMASTER_H */
-